﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="~/css/aui.css" />
    <style type="text/css">
        .header {
            padding: 2.5rem 0.5rem 2rem 0.5rem;
        }
    </style>
</head>
<body>
    <br />
    <header class="aui-bar aui-bar-nav aui-text-left header" id="header">
        <h1>
            <a class="aui-btn aui-pull-right" tapmode onclick="openClub()">

                <i class="aui-iconfont aui-icon-question"></i>
            </a>登陆
        </h1>
    </header>


    <!--👇声明提交from表单到后端，method="post"-->


    @using (Html.BeginForm("Login", "Home", FormMethod.Post))
    {
        <form asp-controller="Login" asp-action="Index">
            <!--👇from表单,提交到后端-->

            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                帐号
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" autocomplete="off" name="uname" placeholder="用户名" pattern="^[a-zA-Z0-9_]{1,16}$" required oninvalid="setCustomValidity('请输入正确的用户名');" oninput="setCustomValidity('');">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                密码
                            </div>
                            <div class="aui-list-item-input">
                                <input type="password" autocomplete="off" name="userpwd" class="form-control" placeholder="密码" pattern="^[a-zA-Z0-9_]{6,16}$" required oninvalid="setCustomValidity('密码至少需要六位');" oninput="setCustomValidity('');">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>

            <div class="login-box">
                <div class="login-box-body">
                    <div class="form-group has-feedback">
                        <span class="text-danger"></span>
                    </div>
                    <div class="form-group has-feedback">
                        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                    </div>
                    <div class="row">
                        <p><button type="submit" class="aui-btn aui-btn-info aui-btn-block">登录</button></p>
                        <br />
                        <p><a href="/Admin/index" class="aui-btn aui-btn-info aui-btn-block">测试入口：管理员</a></p>
                        <br />
                        <p><a href="/Home/LoginV" class="aui-btn aui-btn-info aui-btn-block">测试入口：患者用户</a></p>
                        <br />
                        <p><a href="/Home/LoginD" class="aui-btn aui-btn-info aui-btn-block">测试入口：医生用户</a></p>
                        <br />
                        <p><a href="/Home/LoginB" class="aui-btn aui-btn-info aui-btn-block">测试入口：被冻结  用户</a></p>

                    </div>
        </form>}

    <div id="register_pc_direct_login" class="register-hidden-gruop text-right">
        <a href="/home/register">
            <i class="aui-iconfont aui-icon-paper"></i>没有账号？立即注册&gt;
        </a>
    </div>
    <!-- /.login-box -->

</body>

</html><script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });
</script>

    <!--    关键说明
    model LoginModel  指定页面绑定的模型为LoginModel。
    asp-controller 指定form标签提交时对应的控制器名称。
    asp-action 指定form标签提交时对应的Action名称。
    asp-for 指定HTML元素绑定的模型对应的属性名称。
    asp-validation-for 绑定对应模型属性名称，模型验证失败时，显示模型定义的ErrorMessage。
    asp-validation-summary="All" 显示所有验证失败的错误信息。-->
